import request from '@/utils/request_zc'

export function getMaterialCatgoryList ({
  page,
  limit,
  keyword
}) {
  return request({
    url: '/wms/material/category/page',
    method: 'get',
    params: {
      page,
      limit,
      keyword
    }
  })
}

export function getMaterialCatgoryChildrenList () {
  return request({
    url: '/wms/material/category/list',
    method: 'get',
  })
}

export function DelMaterialCategory ({ ids }) {
  return request({
    url: '/wms/material/category/del',
    method: 'post',
    data: {
      ids
    }
  })
}

export function addMaterialCatgory ({
  code,
  name,
  remark,
  pid, }) {
  return request({
    url: '/wms/material/category/add',
    method: 'post',
    data: {
      code,
      name,
      remark,
      pid,
    }
  })
}

export function editMaterialCatgory ({
  id,
  code,
  name,
  remark,
  pid, }) {
  return request({
    url: '/wms/material/category/edit',
    method: 'post',
    data: {
      id,
      code,
      name,
      remark,
      pid,
    }
  })
}


